﻿/**
 *
 * @file FITKAcousticsNCTSeptum.h
 * @brief 多层声包子类 多孔介质
 * @author liuzhiyuan(liuzhiyuan@diso.cn)
 * @date 2024-11-1
 *
 */

#ifndef FITKACOUSTICSNCTPERFORATED_H
#define FITKACOUSTICSNCTPERFORATED_H

#include "FITKAcousticsPhysicsAPI.h"
#include "FITKAcousticsNCTLayUp.h"

namespace Acoustics
{
    /**
     * @brief 多层声包 多孔介质
     * @author liuzhiyuan(liuzhiyuan@diso.cn)
     * @date 2024-11-1
     */
    class FITKAcousticsPhysicsAPI FITKAcousticsNCTPerforated :public FITKAcousticsNCTAbstractLayObj
    {
        FITKCLASS(Acoustics, FITKAcousticsNCTPerforated);
    public:
        enum NCTSolidType
        {
            NoneSolid = -1,        ///< 空 -1
            Rigid,       ///< 刚性
            LimpDensity, ///< 柔韧密度
            FoamOrFiber  ///< 泡沫或纤维

        };
        enum PerforationType
        {
            None = -1,        ///< 空
            Geometry,       ///< 几何
            BiotProperty ///< Biot属性***Biot 特性”是指基于 Biot（人名） 多孔弹性理论的材料特性
        };
        /**
         * @brief 构造函数
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        explicit FITKAcousticsNCTPerforated() = default;
        /**
         * @brief 析构函数
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        virtual ~FITKAcousticsNCTPerforated();
        /**
         * @brief 获取类型
         * @return double
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        NCTLayUpType getNCTLayUpType() override;
        /**
         * @brief 单位面积的质量
         * @return double
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        double getMassPerUnitArea() override;
        /**
         * @brief 密度
         * @return double
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        double getDensity();
        /**
         * @brief 设置密度
         * @param[i] density 密度
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        void setDensity(double density);

        /**
         * @brief 流体材料id
         * @return int
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        int getfluidMaterialID();

        /**
         * @brief 流体材料id
         * @param[i] int id
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        void setfluidMaterialID(int id);

        /**
         * @brief 材料id
         * @return int
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        int getMaterialID();

        /**
         * @brief 材料id
         * @param[i] int id
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        void setMaterialID(int id);
        /**
         * @brief 孔隙度
         * @return double
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        double getPorosity();

        /**
         * @brief 孔隙度
         * @param[i] double porosity
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        void setPorosity(double porosity);

        /**
         * @brief 半径
         * @return double
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        double getRadius();

        /**
         * @brief 半径
         * @param[i] double r
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        void setRadius(double r);


        /**
         * @brief 面积比率
         * @return double
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        double getAreaRatio();

        /**
         * @brief 面积比率
         * @param[i] double aRatio
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        void setAreaRatio(double aRatio);

        /**
         * @brief 流量阻力
         * @return double
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        double getFlowResistivity();

        /**
         * @brief 流量阻力
         * @param[i] double flowR
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        void setFlowResistivity(double flowR);

        /**
         * @brief 获取固体类型
         * @return NCTSolidType
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        Acoustics::FITKAcousticsNCTPerforated::NCTSolidType getSolidType();

        /**
         * @brief 设置固体类型
         * @param[i] NCTSolidType t
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        void setSolidType(Acoustics::FITKAcousticsNCTPerforated::NCTSolidType t);

        /**
         * @brief 穿孔类型
         * @return NCTSolidType
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        Acoustics::FITKAcousticsNCTPerforated::PerforationType getPerforationType();

        /**
         * @brief 穿孔类型
         * @param[i] PerforationType t
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-11-1
         */
        void setPerforationType(Acoustics::FITKAcousticsNCTPerforated::PerforationType t);

        /**
       * @brief 复制数据对象,深拷贝，数据id不拷贝
       * @param[i] obj 被拷贝的对象
       * @return true
       * @return false
       * @author liuzhiyuan(liuzhiyuan@diso.cn)
       * @date 2024-11-10
       */
        virtual bool copy(FITKAbstractDataObject* obj) override;

    private:
        /**
         * @brief  密度
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date   2024-10-15
         */
        double _density{0.0};
        /**
         * @brief  流体材料id
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date   2024-10-15
         */
        int _fluidMaterialID {0};
        /**
         * @brief  材料id
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date   2024-10-15
         */
        int _materialID {0};
        /**
         * @brief  孔隙度
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date   2024-10-15
         */
        double _porosity {0.0};
        /**
         * @brief  半径
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date   2024-10-15
         */
        double _radius {0.0};
        /**
         * @brief  面积比率
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date   2024-10-15
         */
        double _areaRatio {0.0};

        /**
         * @brief  流量阻力
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date   2024-10-15
         */
        double _flowResistivity {0.0};
        /**
         * @brief  固体类型
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date   2024-10-15
         */
        NCTSolidType _NCTSolidType{NCTSolidType::NoneSolid};
        /**
         * @brief  穿孔类型
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date   2024-10-15
         */
        PerforationType _perforationType{PerforationType::None};
    };

}

#endif // FITKACOUSTICSNCTPERFORATED_H
